<%@page import="java.sql.SQLException"%>
<%@page import="cn.jhc.bean.ShopBean"%>
<%@page import="cn.jhc.dao.ShopDAO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="common.jsp"%>
<jsp:useBean id="cart" scope="session" class="cn.jhc.bean.CartBean" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="./css/music.css"></link>
<style>
* {
	border: 0;
}
</style>
<title>蓝调吉他社吉他小店</title>
</head>
<body>
	<jsp:include page="additem.jsp" flush="false" />
	<%
		request.setCharacterEncoding("UTF-8");
		String isbn = request.getParameter("isbn");
		ShopDAO dao = new ShopDAO();
		ShopBean t = null;
		try {
			t = dao.getShop(isbn);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		request.setAttribute("title", t);
	%>
	<div id="wrapper">
		<jsp:include page="./header.jsp"></jsp:include>
		<div id="address">
			<a>当前位置：吉他小店 > ${requestScope.title.title}</a>
		</div>
		<div id="box">
			<div class="shengming">
				<h4>声明:</h4>
				<a> 为方便社员购买吉他，本小店提供吉他样式，社员提交订单后，管理员会与你联系，请社员填写真实信息!</a>
			</div>
		</div>
		<div id="shopcart2">
			<div id="onebook">
				<div class="oneimage" title="${requestScope.title.title}">
					<img src="images/${requestScope.title.imageFile}" width="450"
						height="400" />
				</div>
				<div id="test">
					<div class="titletext">
						<a>吉他编号:</a>
					</div>
					<div class="contenttext">
						<a>&nbsp;${requestScope.title.isbn}</a>
					</div>
					<div class="titletext">
						<a>吉他样式:</a>
					</div>
					<div class="contenttext">
						<a>&nbsp;${requestScope.title.title}</a>
					</div>
					<div class="titletext">
						<a>价&nbsp;&nbsp;&nbsp;&nbsp;格:</a>
					</div>
					<div class="contenttext">
						<a>&nbsp;${requestScope.title.price}</a>
					</div>
					<div class="titletext">
						<a>地&nbsp;&nbsp;&nbsp;&nbsp;址:</a>
					</div>
					<div class="contenttext">
						<a>&nbsp;${requestScope.title.address}</a>
					</div>
					<div class="titletext">
						<a>厂&nbsp;&nbsp;&nbsp;&nbsp;商:</a>
					</div>
					<div class="contenttext">
						<a>&nbsp;${requestScope.title.manufacturers}</a>
					</div>
					<div class="titletext">
						<a>件&nbsp;&nbsp;&nbsp;&nbsp;数:</a>
					</div>
					<div class="contenttext">
						<a>&nbsp;${requestScope.title.amount}</a>
					</div>
					<div class="titletext">
						<a>出厂时间:</a>
					</div>
					<div class="contenttext">
						<a>&nbsp;${requestScope.title.publish_date}</a>
					</div>
					<div class="titletext">
						<a>产品介绍:</a>
					</div>
					<div class="contenttext">
						<a>&nbsp;${requestScope.title.remark}</a>
					</div>
				</div>
			</div>
		</div>

		<%
			if (cart.isExist(new Integer(isbn))) {
		%>
		<div id="button">
			<a>商品在购物车中</a>
		</div>
		<%
			} else {
		%>
		<div id="button">
			<form method="post" action="./showjita.jsp">
				<input type="hidden" name="isbn" value="${requestScope.title.isbn}"></input>
				<input type="hidden" name="add" value="${requestScope.title.isbn}"></input>
				<input type="submit" value="加入购物车"></input>
			</form>
		</div>
		<%
			}
		%>
		<div id="button_bg"></div>	
		<div id="button_down">
			<br>购物车中现有<%=cart.getNumOfItems()%>种商品 &nbsp;&nbsp;&nbsp;&nbsp;
			<a href="showcart.jsp"><font color="white">查看购物车</font></a>
			&nbsp;&nbsp;&nbsp;&nbsp; <a href="showallgoods.do?cond=all"><font
				color="white">返回小店</font></a>
		</div>
		<div id="line2"></div>
		<div id="copyright">
			<a>&copy;版权所有:蓝调吉他社 </a><a>| </a>
			<div id="admin">
				<a href="houtai_index.jsp">管理员登录</a>
			</div>
		</div>
	</div>
</body>
</html>
